/* ==========================================================================
   ShopEase Hero - Premium (scoped #homeHero, overrides Bootstrap)
   ========================================================================== */

/* --- Bootstrap reset di dalam hero --- */
#homeHero,
#homeHero * {
    box-sizing: border-box;
}

#homeHero a,
#homeHero a:hover,
#homeHero a:focus,
#homeHero a:visited,
#homeHero a:active {
    text-decoration: none !important;
}

#homeHero p,
#homeHero h1,
#homeHero ul,
#homeHero li,
#homeHero span {
    margin: 0;
    padding: 0;
    color: inherit;
}

#homeHero ul {
    list-style: none;
}

/* --- Tokens --- */
#homeHero.home-hero {
    --hero-max: 1200px;
    --hero-font: "Inter", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --hero-white: #ffffff;
    --hero-muted: rgba(255, 255, 255, 0.72);
    --hero-glass: rgba(255, 255, 255, 0.1);
    --hero-border: rgba(255, 255, 255, 0.14);
    --hero-radius: 16px;
    --hero-radius-lg: 20px;
    --hero-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* --- Shell --- */
#homeHero.home-hero {
    position: relative;
    width: 100%;
    min-height: clamp(560px, 82vh, 720px);
    display: flex;
    align-items: center;
    overflow: hidden;
    font-family: var(--hero-font);
    color: var(--hero-white);
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

/* --- Background --- */
#homeHero .home-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

#homeHero .home-hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#homeHero .home-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        110deg,
        rgba(5, 8, 16, 0.9) 0%,
        rgba(5, 8, 16, 0.75) 45%,
        rgba(5, 8, 16, 0.5) 100%
    );
    pointer-events: none;
    transition: background 0.3s ease;
}

[data-theme="dark"] #homeHero .home-hero__overlay {
    background: linear-gradient(
        110deg,
        rgba(2, 6, 14, 0.94) 0%,
        rgba(2, 6, 14, 0.82) 45%,
        rgba(2, 6, 14, 0.65) 100%
    );
}

#homeHero .home-hero__vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 80% at 15% 50%, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

#homeHero .home-hero__fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    height: 72px;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--background, #F8FAFC));
}

/* --- Container --- */
#homeHero .home-hero__container {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: var(--hero-max);
    margin: 0 auto;
    padding: clamp(5rem, 10vw, 7rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 6vw, 4rem);
}

#homeHero .home-hero__content {
    max-width: 600px;
}

/* --- Eyebrow --- */
#homeHero .home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.9rem 0.4rem 0.65rem;
    background: var(--hero-glass);
    border: 1px solid var(--hero-border);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#homeHero .home-hero__eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success, #22C55E);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
    flex-shrink: 0;
}

#homeHero .home-hero__eyebrow-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hero-muted) !important;
}

/* --- Title & desc --- */
#homeHero .home-hero__title {
    margin-bottom: 1.25rem;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--hero-white) !important;
}

#homeHero .home-hero__title-line {
    display: block;
}

#homeHero .home-hero__title-line--accent {
    margin-top: 0.1em;
    color: rgba(255, 255, 255, 0.92) !important;
}

#homeHero .home-hero__desc {
    margin-bottom: 2rem;
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--hero-muted) !important;
    max-width: 42ch;
}

/* --- Buttons --- */
#homeHero .home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

#homeHero a.home-hero__btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.5rem !important;
    font-family: var(--hero-font) !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: var(--hero-radius) !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

#homeHero a.home-hero__btn--primary {
    color: #ffffff !important;
    background: var(--primary, #2563EB) !important;
    border-color: var(--primary, #2563EB) !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35) !important;
}

#homeHero a.home-hero__btn--primary:hover,
#homeHero a.home-hero__btn--primary:focus {
    color: #ffffff !important;
    background: var(--primary-hover, #1D4ED8) !important;
    border-color: var(--primary-hover, #1D4ED8) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45) !important;
}

#homeHero a.home-hero__btn--secondary {
    color: #ffffff !important;
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#homeHero a.home-hero__btn--secondary:hover,
#homeHero a.home-hero__btn--secondary:focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    transform: translateY(-2px);
}

#homeHero .home-hero__btn-icon {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

#homeHero a.home-hero__btn--primary:hover .home-hero__btn-icon {
    transform: translateX(3px);
}

/* --- Stats card --- */
#homeHero .home-hero__stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    max-width: 480px;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1rem;
    background: var(--hero-glass) !important;
    border: 1px solid var(--hero-border) !important;
    border-radius: var(--hero-radius-lg) !important;
    box-shadow: var(--hero-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#homeHero .home-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
    position: relative;
}

#homeHero .home-hero__stat:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 2rem;
    background: rgba(255, 255, 255, 0.18);
}

#homeHero .home-hero__stat-value {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #ffffff !important;
}

#homeHero .home-hero__stat-suffix {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--hero-muted) !important;
}

#homeHero .home-hero__stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hero-muted) !important;
    white-space: nowrap;
}

/* --- Trust badges --- */
#homeHero .home-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 520px;
}

#homeHero .home-hero__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92) !important;
    background: var(--hero-glass) !important;
    border: 1px solid var(--hero-border) !important;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

#homeHero .home-hero__trust-item:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    transform: translateY(-1px);
}

#homeHero .home-hero__trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    flex-shrink: 0;
}

#homeHero .home-hero__trust-text {
    color: rgba(255, 255, 255, 0.92) !important;
    white-space: nowrap;
}

/* --- Animasi: tampil default, animasi hanya jika JS aktif --- */
#homeHero .home-hero__animate {
    opacity: 1;
    transform: none;
}

#homeHero.js-ready:not(.is-visible) .home-hero__animate {
    opacity: 0;
    transform: translateY(18px);
}

#homeHero.js-ready.is-visible .home-hero__animate {
    animation: heroFadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#homeHero.js-ready.is-visible .home-hero__animate[data-delay="0"] { animation-delay: 0ms; }
#homeHero.js-ready.is-visible .home-hero__animate[data-delay="1"] { animation-delay: 70ms; }
#homeHero.js-ready.is-visible .home-hero__animate[data-delay="2"] { animation-delay: 140ms; }
#homeHero.js-ready.is-visible .home-hero__animate[data-delay="3"] { animation-delay: 210ms; }
#homeHero.js-ready.is-visible .home-hero__animate[data-delay="4"] { animation-delay: 280ms; }
#homeHero.js-ready.is-visible .home-hero__animate[data-delay="5"] { animation-delay: 350ms; }

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Layout halaman utama --- */
.main--home {
    padding-top: 0;
}

.main--home .container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* --- Tablet --- */
@media (max-width: 991.98px) {
    #homeHero .home-hero__stats {
        max-width: 100%;
    }
}

/* --- Mobile --- */
@media (max-width: 575.98px) {
    #homeHero.home-hero {
        min-height: auto;
    }

    #homeHero .home-hero__container {
        padding-top: 4.5rem;
        padding-bottom: 2.5rem;
    }

    #homeHero .home-hero__content {
        max-width: 100%;
    }

    #homeHero .home-hero__actions {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 2rem;
    }

    #homeHero a.home-hero__btn {
        width: 100%;
    }

    #homeHero .home-hero__stats {
        grid-template-columns: 1fr !important;
        max-width: 100%;
        padding: 1rem;
    }

    #homeHero .home-hero__stat {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 0.65rem 0.25rem;
    }

    #homeHero .home-hero__stat:not(:last-child)::after {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 1px;
        transform: none;
    }

    #homeHero .home-hero__trust {
        flex-direction: column;
        align-items: stretch;
    }

    #homeHero .home-hero__trust-item {
        width: 100%;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    #homeHero .home-hero__animate {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    #homeHero a.home-hero__btn,
    #homeHero .home-hero__trust-item {
        transition: none !important;
    }
}
